<%-- 
    Document   : addTest
    Created on : Nov 4, 2009, 1:55:06 PM
    Author     : khanhlv_b00554
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.sql.*,DAO.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%
    Test check = new Test();
    String txtSub = request.getParameter("txtSubSubject");
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" media="screen" href="css/admin.css">
        <title>JSP Page</title>
    </head>
    <script language="javascript" src="js/checkForm.js" ></script>
    <body>
        <fieldset class="lang" >
            <form action="actionAddTest.jsp" method="post" name="myForm">
                <table align="center" width="500">
                    <br>
                    <tr>
                        <td></td>
                        <td align="center">
                            <span class="textSpanTitle"> Add Test Question </span>
                        </td>
                    </tr>
                    <tr>
                        <td>Subject : </td>
                        <td>
                            <select name="txtSubID" >
                                <option value="0">Select Subject</option>
                                <%
                                    ResultSet rs = check.viewSubSubject();
                                    while(rs.next()) {
                                %>
                                <option value="<%=rs.getString("SubID")%>" <% if(rs.getString("SubID").equals(txtSub)) { %> selected="true" <% } %> ><%=rs.getString("SubName")%></option>
                                <% } %>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>Content Test :</td>
                        <td>
                            
                            <label>
                            <textarea cols="50" rows="8" name="txtContentTest"></textarea>
                            </label>
                            <span id="txtContent" class="textSpanCheck"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Time : </td>
                        <td>
                            <select name="txtTime">
                                <% for(int i=15;i<=90;i=i+5) {%>
                                <option value="<%=i%>"><%=i%></option>
                                <% } %>
                            </select> <span class="textSpan">Phút</span>
                        </td>
                    </tr>
                        <tr>
                        <td>Status : </td>
                        <td>
                            <input type="radio" name="txtStatus" value="True" checked="true"> <span class="textSpan">Hiển Thị</span>
                            <input type="radio" name="txtStatus" value="False"> <span class="textSpan">Không Hiển Thị</span>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="button" value="Add Test" class="button"  onclick="checkForm()"/>
                            <input type="reset" value="Reset" class="button" />
                        </td>
                    </tr>
                </table>
            
        </form>
        </fieldset>
    </body>
</html>
